<template>
  <div class="container">
    <div id="cesiumContainer"></div>
  </div>
</template>
 
<script>
export default {
  name: "cesiumviewer",
  data() {
    return {};
  },
  mounted() {
    var Cesium = this.Cesium;
    var cesiumContainer = document.getElementById("cesiumContainer");
    var viewer = new Cesium.Viewer("cesiumContainer", {
      //加载在线谷歌地图
      imageryProvider: new Cesium.UrlTemplateImageryProvider({
        url: "http://www.google.cn/maps/vt?lyrs=s&x={x}&y={y}&z={z}"
      }),
      animation: false,
      baseLayerPicker:false,
      geocode:false,
      homeButton:false,
      infoBox: false,
      sceneModelPicker: true,
      timeline: false,
      navigationHelpButton: false,
      navigationInstructionsInitiallyVisible:false,
      navigation:false
    });

    //去除掉 版权信息
    viewer._cesiumWidget._creditContainer.style.display = "none";
  }
};
</script>
 
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
.container {
  width: 100%;
  height: 100%;
}

html,body,#cesiumContainer {
  width: 100%;
  height: 100%;
  position:absolute;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

.cesium-widget-credits {
  display: none !important;
  visibility: hide !important;
}
</style>